package com.lyw.gulimall.product.dao;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lyw.gulimall.product.entity.AttrEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 商品属性
 *
 * @author liyawei
 * @email liyawei@gmail.com
 * @date 2022-05-31 11:06:15
 */
@Mapper
public interface AttrDao extends BaseMapper<AttrEntity> {

    IPage<AttrEntity> selectAttrBasePageList(Page<AttrEntity> result, @Param(Constants.WRAPPER) LambdaQueryWrapper<AttrEntity> lqw);

    IPage<Map<String, Object>> selectPageList(Page<AttrEntity> result, @Param(Constants.WRAPPER) LambdaQueryWrapper<AttrEntity> lqw);

    List<AttrEntity> selectSearchAttrIds(@Param("attrIds") List<Long> attrIds);
}
